package com.qf.service;


import com.qf.commons.TableData;
import com.qf.entity.User;
import com.qf.exception.BizException;

import java.io.InputStream;
import java.util.Date;

public interface UserService {

    TableData<User> getPageData(Integer offset, Integer limit, String name, String sex,Integer status,
                                String email, Date afterDate,
                                Date endDate) throws BizException;

    void deleteUserById(Integer id) throws BizException;

    User getUserById(Integer id) throws BizException;

    void updateUser(User user) throws BizException;

    /**
     * 生成excel
     * @return 返回为excel文件在本地的保存路径
     */
    String generateExcel(String fileName,String name, String sex, Integer status,String email,
                        Date afterDate, Date endDate) throws BizException;

    // 解析Excel并插入数据到数据库
    Integer parseExcelAndInsertData(InputStream inputStream) throws BizException;
}
